<template>
	<view class="buymember">
		<view v-for="item in member" :key="item.id" class="member">
			<image :src="item.avatar ? item.avatar : 'http://thirdwx.qlogo.cn/mmopen/ywutyVN8JTp9ibAc2jCnGlgIXxG2DcTT27uiauCNYCzQ20mpyE9TamDzawcIejTZMutodNxxlMVU3yiaIicRaXq9iaequLsnRaHDY/132'"></image>
			<text>{{item.realname ? item.realname : item.nickname}}</text>
		</view>
		
		<view class="load">
			<view class="" v-if="!show">
				<uni-icons type="icon-jiazaizhong" color="#595959" size="25"></uni-icons>
				<text>加载中...</text>
			</view>
			<view class="" v-if="show">
				<!-- <uni-icons type="icon-zanwushuju" color="#595959" size="25"></uni-icons> -->
				<text>暂时没有更多数据了...</text>
			</view>
		</view>
	</view>
	
	
</template>

<script>
	import {getOne} from '../../api/publicapi.js'
	
	export default {
		data() {
			return {
				member: [],
				show: false,
			}
		},
		onShow() {
			this.buymember();
		},
		methods: {
			buymember(){
				getOne('front/storeapply/getuser').then(res => {
					// console.log(res)
					let member = res.data
					let opj = JSON.parse(JSON.stringify(this.member))
					for (var i in member) {
						if (i !== 'undefined') {
							Object.assign(opj, member)
							this.show = true
							break
						} else {
							this.show = false
							break
						}
					}
					this.member = opj
				})
			},
			
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #f7f7f7;
	}
	.buymember{
		background-color: #FFF;
		border-top: 1px solid #C0C4CC;
		.member{
			border-bottom: 1px solid #C0C4CC;
			display: flex;
			justify-content: flex-start;
			image{
				width: 100upx;
				height: 100upx;
				margin: 20upx;
			}
			text{
				line-height: 132upx;
			}
		}
	}
	.load {
		text-align: center;
		padding: 30upx;
		font-size: 30upx;
		background: #f7f7f7;
	}
</style>
